home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / perl5 / re.z / re
Encoding:
Text File  |  2002-10-03  |  1.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. rrrreeee((((3333))))                                                                    rrrreeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      re - Perl pragma to alter regular expression behaviour
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          ($x) = ($^X =~ /^(.*)$/s);     # $x is not tainted here
  13.  
  14.          use re "taint";
  15.          ($x) = ($^X =~ /^(.*)$/s);     # $x _is_ tainted here
  16.  
  17.      (We use $^X in these examples because it's tainted by default.)
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      When use re 'taint' is in effect, and a tainted string is the target of a
  21.      regex, the regex memories (or values returned by the m// operator in list
  22.      context) are tainted.
  23.  
  24.      This feature is useful when regex operations on tainted data aren't meant
  25.      to extract safe substrings, but to perform other transformations.
  26.  
  27.      See the section on _P_r_a_g_m_a_t_i_c _M_o_d_u_l_e_s in the _p_e_r_l_m_o_d_l_i_b manpage.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.